package com.example.demo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * 缓存
 * 1.依赖spring-boot-starter-cache
 * 2 配置
 * <span></span>   RedisCacheConfiguration 自动配置RedisCacheManager
 * 3 配置：spring.cache.type
 */
@Slf4j
@SpringBootApplication
@EnableRedisHttpSession//整合redis作为session 存储
//@NacosPropertySource(dataId = "example", autoRefreshed = true)
public class DemoApplication {

    public static void main(String[] args) {
        String kString = Thread.currentThread().getContextClassLoader().getResource("").getFile();
        SpringApplication.run(DemoApplication.class, args);
        System.out.println(kString);
        log.info("getContextClassLoader getResource={}", kString);
    }

}
